package ae.pcfc.cldos.online.common.tscdb.domain;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.ColumnResult;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SqlResultSetMapping;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

import org.hibernate.annotations.NamedNativeQuery;

import ae.pcfc.cldos.online.common.domain.BaseEntity;

/**
 * TTscClientCompany entity. @author Asna Khader
 */
@Entity
@SqlResultSetMapping(name="tksIdPin",        
		columns = { @ColumnResult(name = "CC_TRAKHEES_ID"),
                    @ColumnResult(name = "PIN_CODE") } )
//@NamedNativeQuery(name = "getByEmail", query = "call findByEmail(?, :ccEmail)", callable = true, resultSetMapping ="tksIdPin")
@NamedNativeQuery(name = "getClientCompanyTksIdPINByEmail", query = "call P_CLNT_CMP_TKSID_PIN_BY_EMAIL(?, :P_CC_EMAIL)", callable = true, resultSetMapping ="tksIdPin", resultClass = TTscClientCompany.class)
@Table(name = "T_TSC_CLIENT_COMPANY", uniqueConstraints = @UniqueConstraint(columnNames = "PIN_CODE"))
public class TTscClientCompany extends BaseEntity implements java.io.Serializable {

	// Fields
	
	public static final String __TRAKHEES_ID = "ccTrakheesId";
	public static final String __LICENSE_ID = "ccLicNo";
	
	public static final String __LIC_EXP_DATE = "ccLicExpiryDate";
	public static final String __LIC_STATUS = "ccLicStatus";
	public static final String __COMP_STATUS = "ccStatus";
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private BigDecimal ccClientid;
	private TTscClientCategory TTscClientCategory;
	private String ccName;
	private String ccNameArb;
	private String ccOpName;
	private String ccOpNameArb;
	private String ccLicIssuingAuthority;
	private String ccLicType;
	private String ccLicNo;
	private String ccLicStatus;
	private Date ccLicIssueDate;
	private Date ccLicExpiryDate;
	private Date ccLicCancelDate;
	private String ccPobox;
	private String ccPoboxLocation;
	private String ccAddress;
	private String ccAddressArb;
	private String ccOffTel;
	private String ccOffFax;
	private String ccEmail;
	private String ccWebsite;
	private String ccStreetNo;
	private String ccBuildingNo;
	private String ccFloorNo;
	private String ccUnitNo;
	private String ccUnitType;
	private String ccCreateduser;
	private Date ccCreatedtime;
	private String ccModifieduser;
	private Date ccModifiedtime;
	private String ccStatus;
	private String ccLicId;
	private String ccCity;
	private String ccCityArb;
	private String ccCountry;
	private String ccCountryArb;
	private String ccTrakheesId;
	private String pinCode;

	// Constructors

	/** default constructor */
	public TTscClientCompany() {
	}

	/** full constructor */
	public TTscClientCompany(TTscClientCategory TTscClientCategory,
			String ccName, String ccNameArb, String ccOpName,
			String ccOpNameArb, String ccLicIssuingAuthority, String ccLicType,
			String ccLicNo, String ccLicStatus, Date ccLicIssueDate,
			Date ccLicExpiryDate, Date ccLicCancelDate, String ccPobox,
			String ccPoboxLocation, String ccAddress, String ccAddressArb,
			String ccOffTel, String ccOffFax, String ccEmail, String ccWebsite,
			String ccStreetNo, String ccBuildingNo, String ccFloorNo,
			String ccUnitNo, String ccUnitType, String ccCreateduser,
			Date ccCreatedtime, String ccModifieduser, Date ccModifiedtime,
			String ccStatus, String ccLicId, String ccCity, String ccCityArb,
			String ccCountry, String ccCountryArb, String ccTrakheesId,
			String pinCode) {
		this.TTscClientCategory = TTscClientCategory;
		this.ccName = ccName;
		this.ccNameArb = ccNameArb;
		this.ccOpName = ccOpName;
		this.ccOpNameArb = ccOpNameArb;
		this.ccLicIssuingAuthority = ccLicIssuingAuthority;
		this.ccLicType = ccLicType;
		this.ccLicNo = ccLicNo;
		this.ccLicStatus = ccLicStatus;
		this.ccLicIssueDate = ccLicIssueDate;
		this.ccLicExpiryDate = ccLicExpiryDate;
		this.ccLicCancelDate = ccLicCancelDate;
		this.ccPobox = ccPobox;
		this.ccPoboxLocation = ccPoboxLocation;
		this.ccAddress = ccAddress;
		this.ccAddressArb = ccAddressArb;
		this.ccOffTel = ccOffTel;
		this.ccOffFax = ccOffFax;
		this.ccEmail = ccEmail;
		this.ccWebsite = ccWebsite;
		this.ccStreetNo = ccStreetNo;
		this.ccBuildingNo = ccBuildingNo;
		this.ccFloorNo = ccFloorNo;
		this.ccUnitNo = ccUnitNo;
		this.ccUnitType = ccUnitType;
		this.ccCreateduser = ccCreateduser;
		this.ccCreatedtime = ccCreatedtime;
		this.ccModifieduser = ccModifieduser;
		this.ccModifiedtime = ccModifiedtime;
		this.ccStatus = ccStatus;
		this.ccLicId = ccLicId;
		this.ccCity = ccCity;
		this.ccCityArb = ccCityArb;
		this.ccCountry = ccCountry;
		this.ccCountryArb = ccCountryArb;
		this.ccTrakheesId = ccTrakheesId;
		this.pinCode = pinCode;
	}

	// Property accessors
	@Id	
	@Column(name = "CC_CLIENTID", unique = true, nullable = false, precision = 22, scale = 0)
	public BigDecimal getCcClientid() {
		return this.ccClientid;
	}

	public void setCcClientid(BigDecimal ccClientid) {
		this.ccClientid = ccClientid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CC_CATEGORY")
	public TTscClientCategory getTTscClientCategory() {
		return this.TTscClientCategory;
	}

	public void setTTscClientCategory(TTscClientCategory TTscClientCategory) {
		this.TTscClientCategory = TTscClientCategory;
	}

	@Column(name = "CC_NAME", length = 100)
	public String getCcName() {
		return this.ccName;
	}

	public void setCcName(String ccName) {
		this.ccName = ccName;
	}

	@Column(name = "CC_NAME_ARB", length = 50)
	public String getCcNameArb() {
		return this.ccNameArb;
	}

	public void setCcNameArb(String ccNameArb) {
		this.ccNameArb = ccNameArb;
	}

	@Column(name = "CC_OP_NAME", length = 100)
	public String getCcOpName() {
		return this.ccOpName;
	}

	public void setCcOpName(String ccOpName) {
		this.ccOpName = ccOpName;
	}

	@Column(name = "CC_OP_NAME_ARB", length = 50)
	public String getCcOpNameArb() {
		return this.ccOpNameArb;
	}

	public void setCcOpNameArb(String ccOpNameArb) {
		this.ccOpNameArb = ccOpNameArb;
	}

	@Column(name = "CC_LIC_ISSUING_AUTHORITY", length = 10)
	public String getCcLicIssuingAuthority() {
		return this.ccLicIssuingAuthority;
	}

	public void setCcLicIssuingAuthority(String ccLicIssuingAuthority) {
		this.ccLicIssuingAuthority = ccLicIssuingAuthority;
	}

	@Column(name = "CC_LIC_TYPE", length = 10)
	public String getCcLicType() {
		return this.ccLicType;
	}

	public void setCcLicType(String ccLicType) {
		this.ccLicType = ccLicType;
	}

	@Column(name = "CC_LIC_NO", length = 20)
	public String getCcLicNo() {
		return this.ccLicNo;
	}

	public void setCcLicNo(String ccLicNo) {
		this.ccLicNo = ccLicNo;
	}

	@Column(name = "CC_LIC_STATUS", length = 20)
	public String getCcLicStatus() {
		return this.ccLicStatus;
	}

	public void setCcLicStatus(String ccLicStatus) {
		this.ccLicStatus = ccLicStatus;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CC_LIC_ISSUE_DATE", length = 7)
	public Date getCcLicIssueDate() {
		return this.ccLicIssueDate;
	}

	public void setCcLicIssueDate(Date ccLicIssueDate) {
		this.ccLicIssueDate = ccLicIssueDate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CC_LIC_EXPIRY_DATE", length = 7)
	public Date getCcLicExpiryDate() {
		return this.ccLicExpiryDate;
	}

	public void setCcLicExpiryDate(Date ccLicExpiryDate) {
		this.ccLicExpiryDate = ccLicExpiryDate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CC_LIC_CANCEL_DATE", length = 7)
	public Date getCcLicCancelDate() {
		return this.ccLicCancelDate;
	}

	public void setCcLicCancelDate(Date ccLicCancelDate) {
		this.ccLicCancelDate = ccLicCancelDate;
	}

	@Column(name = "CC_POBOX", length = 20)
	public String getCcPobox() {
		return this.ccPobox;
	}

	public void setCcPobox(String ccPobox) {
		this.ccPobox = ccPobox;
	}

	@Column(name = "CC_POBOX_LOCATION", length = 10)
	public String getCcPoboxLocation() {
		return this.ccPoboxLocation;
	}

	public void setCcPoboxLocation(String ccPoboxLocation) {
		this.ccPoboxLocation = ccPoboxLocation;
	}

	@Column(name = "CC_ADDRESS", length = 200)
	public String getCcAddress() {
		return this.ccAddress;
	}

	public void setCcAddress(String ccAddress) {
		this.ccAddress = ccAddress;
	}

	@Column(name = "CC_ADDRESS_ARB", length = 100)
	public String getCcAddressArb() {
		return this.ccAddressArb;
	}

	public void setCcAddressArb(String ccAddressArb) {
		this.ccAddressArb = ccAddressArb;
	}

	@Column(name = "CC_OFF_TEL", length = 20)
	public String getCcOffTel() {
		return this.ccOffTel;
	}

	public void setCcOffTel(String ccOffTel) {
		this.ccOffTel = ccOffTel;
	}

	@Column(name = "CC_OFF_FAX", length = 20)
	public String getCcOffFax() {
		return this.ccOffFax;
	}

	public void setCcOffFax(String ccOffFax) {
		this.ccOffFax = ccOffFax;
	}

	@Column(name = "CC_EMAIL", length = 100)
	public String getCcEmail() {
		return this.ccEmail;
	}

	public void setCcEmail(String ccEmail) {
		this.ccEmail = ccEmail;
	}

	@Column(name = "CC_WEBSITE", length = 100)
	public String getCcWebsite() {
		return this.ccWebsite;
	}

	public void setCcWebsite(String ccWebsite) {
		this.ccWebsite = ccWebsite;
	}

	@Column(name = "CC_STREET_NO", length = 50)
	public String getCcStreetNo() {
		return this.ccStreetNo;
	}

	public void setCcStreetNo(String ccStreetNo) {
		this.ccStreetNo = ccStreetNo;
	}

	@Column(name = "CC_BUILDING_NO", length = 50)
	public String getCcBuildingNo() {
		return this.ccBuildingNo;
	}

	public void setCcBuildingNo(String ccBuildingNo) {
		this.ccBuildingNo = ccBuildingNo;
	}

	@Column(name = "CC_FLOOR_NO", length = 50)
	public String getCcFloorNo() {
		return this.ccFloorNo;
	}

	public void setCcFloorNo(String ccFloorNo) {
		this.ccFloorNo = ccFloorNo;
	}

	@Column(name = "CC_UNIT_NO", length = 50)
	public String getCcUnitNo() {
		return this.ccUnitNo;
	}

	public void setCcUnitNo(String ccUnitNo) {
		this.ccUnitNo = ccUnitNo;
	}

	@Column(name = "CC_UNIT_TYPE", length = 50)
	public String getCcUnitType() {
		return this.ccUnitType;
	}

	public void setCcUnitType(String ccUnitType) {
		this.ccUnitType = ccUnitType;
	}

	@Column(name = "CC_CREATEDUSER", length = 50)
	public String getCcCreateduser() {
		return this.ccCreateduser;
	}

	public void setCcCreateduser(String ccCreateduser) {
		this.ccCreateduser = ccCreateduser;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CC_CREATEDTIME", length = 7)
	public Date getCcCreatedtime() {
		return this.ccCreatedtime;
	}

	public void setCcCreatedtime(Date ccCreatedtime) {
		this.ccCreatedtime = ccCreatedtime;
	}

	@Column(name = "CC_MODIFIEDUSER", length = 50)
	public String getCcModifieduser() {
		return this.ccModifieduser;
	}

	public void setCcModifieduser(String ccModifieduser) {
		this.ccModifieduser = ccModifieduser;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CC_MODIFIEDTIME", length = 7)
	public Date getCcModifiedtime() {
		return this.ccModifiedtime;
	}

	public void setCcModifiedtime(Date ccModifiedtime) {
		this.ccModifiedtime = ccModifiedtime;
	}

	@Column(name = "CC_STATUS", length = 1)
	public String getCcStatus() {
		return this.ccStatus;
	}

	public void setCcStatus(String ccStatus) {
		this.ccStatus = ccStatus;
	}

	@Column(name = "CC_LIC_ID", length = 30)
	public String getCcLicId() {
		return this.ccLicId;
	}

	public void setCcLicId(String ccLicId) {
		this.ccLicId = ccLicId;
	}

	@Column(name = "CC_CITY", length = 30)
	public String getCcCity() {
		return this.ccCity;
	}

	public void setCcCity(String ccCity) {
		this.ccCity = ccCity;
	}

	@Column(name = "CC_CITY_ARB", length = 30)
	public String getCcCityArb() {
		return this.ccCityArb;
	}

	public void setCcCityArb(String ccCityArb) {
		this.ccCityArb = ccCityArb;
	}

	@Column(name = "CC_COUNTRY", length = 30)
	public String getCcCountry() {
		return this.ccCountry;
	}

	public void setCcCountry(String ccCountry) {
		this.ccCountry = ccCountry;
	}

	@Column(name = "CC_COUNTRY_ARB", length = 30)
	public String getCcCountryArb() {
		return this.ccCountryArb;
	}

	public void setCcCountryArb(String ccCountryArb) {
		this.ccCountryArb = ccCountryArb;
	}

	@Column(name = "CC_TRAKHEES_ID", length = 50)
	public String getCcTrakheesId() {
		return this.ccTrakheesId;
	}

	public void setCcTrakheesId(String ccTrakheesId) {
		this.ccTrakheesId = ccTrakheesId;
	}

	@Column(name = "PIN_CODE", unique = true, length = 10)
	public String getPinCode() {
		return this.pinCode;
	}

	public void setPinCode(String pinCode) {
		this.pinCode = pinCode;
	}

}